import java.util.Scanner;

public class Zy3 {
	public static void main(String[] args) {
		Scanner hei=new Scanner(System.in);
		int a=hei.nextInt();
		for(int i=1;i<=a;i++) {
			for(int x=1;x<=a;x++) {
				if(i==1||i==a) {
					System.out.print("* ");	
				}else if(x>1 &&x<a){
					System.out.print("   ");
				}else {
					System.out.print("*");
				}
			}
			System.out.println();
		}
		
		
		
		
		
		
	}
}
